package e2q.portal.domain.uPortal;

import javax.persistence.Column;

/**
 * UpUserProfileId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class UpUserProfileId implements java.io.Serializable {

	// Fields

	@Column(name = "USER_ID")
	private Integer userId;
	@Column(name = "PROFILE_ID")
	private Integer profileId;

	// Constructors

	/** default constructor */
	public UpUserProfileId() {
	}

	/** full constructor */
	public UpUserProfileId(Integer userId, Integer profileId) {
		this.userId = userId;
		this.profileId = profileId;
	}

	// Property accessors

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getProfileId() {
		return this.profileId;
	}

	public void setProfileId(Integer profileId) {
		this.profileId = profileId;
	}

	@Override
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UpUserProfileId))
			return false;
		UpUserProfileId castOther = (UpUserProfileId) other;

		return ((this.getUserId() == castOther.getUserId()) || (this
				.getUserId() != null
				&& castOther.getUserId() != null && this.getUserId().equals(
				castOther.getUserId())))
				&& ((this.getProfileId() == castOther.getProfileId()) || (this
						.getProfileId() != null
						&& castOther.getProfileId() != null && this
						.getProfileId().equals(castOther.getProfileId())));
	}

	@Override
	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37 * result
				+ (getProfileId() == null ? 0 : this.getProfileId().hashCode());
		return result;
	}

}